home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / serial / modem-st.0 / modem-st / modem-stats / README < prev   
Encoding:
Text File  |  1995-08-02  |  1.1 KB  |  32 lines

  1. #    modem-stats
  2.  
  3. # Send a command to a modem, and echo the modem's response.
  4.  
  5. # This program is typically used to document the modem link status
  6. # after a ppp or slip connection.  It may also be used to gather
  7. # telephone accounting statistics.
  8.  
  9. # This program may also be used to reset a modem,
  10. # or send an initialization string to a modem.
  11.  
  12. # This program may be freely copied and used, as long as this file,
  13. # the accompanying documentation, and the author's name remain intact.
  14.  
  15. # Copyright (c) 1995, Kenneth J. Hendrickson
  16. #      kjh@usc.edu, kjh@seas.smu.edu
  17.  
  18. # To compile, type    make
  19. # To install, type    make install install.man
  20.  
  21. # A snazzy use for modem-stats is to gather modem link statistics at
  22. # the termination of a ppp or slip call.  If you are using ppp, the
  23. # following six lines in your /etc/ppp/ip-down file will do the job:
  24.  
  25. # Gather modem statistics about this particular call
  26. sleep 2 # make sure the modem is really down
  27. DEV=`echo $2 | sed -e 's./dev/..'`
  28. echo '----------' >> /etc/ppp/modem.$DEV
  29. date              >> /etc/ppp/modem.$DEV
  30. modem-stats $2    >> /etc/ppp/modem.$DEV
  31.  
  32.